//
//  TLCommentTextField.h
//  FunnyVideo
//
//  Created by 李鑫 on 15/9/30.
//  Copyright © 2015年 NewEggTech. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol TLCommentTextFieldDelegate <NSObject>
/**
 *  Tells the delegate that the keyboard has full appeared on screen.
 */
- (void)keyboardDidShow;

/**
 *  Tells the delegate that the keyboard origin has moved to the specified point.
 *
 *  @param point The origin of the keyboard's frame in its superview's coordinate system.
 */
- (void)keyboardDidScrollToPoint:(CGPoint)point;

/**
 *  Tells the delegate that the keyboard is about to be dismissed. The keyboard will be removed from from its superview and resign first responder.
 */
- (void)keyboardWillBeDismissed;

/**
 *  Tells the delegate that the keyboard origin is about to move back to the specified point.
 *
 *  @param point The new origin of the keyboard's frame after it has completed animation.
 */
- (void)keyboardWillSnapBackToPoint:(CGPoint)point;
@end

@interface TLCommentTextField : UITextView

/**
 *  The object that acts as the delegate of the receiving text view.
 */
@property (weak, nonatomic) id<TLCommentTextFieldDelegate> keyboardDelegate;

/**
 *  The pan gesture recognizer for the text view.
 */
@property (strong, nonatomic) UIPanGestureRecognizer *dismissivePanGestureRecognizer;

@end
